<template>
	<view class="layout-article-box">
		<view class="article-img" @click="handleClickArticle">
			<image class="img" :src="props.data?.image || handleStaticResources('/static/images/common/empty.png')">
			</image>
		</view>
		<view class="article-msg" @click="handleClickArticle">
			<view class="title">
				{{props.data?.title}}
			</view>
			<view class="desc">
				{{props.data?.brief}}
			</view>
		</view>
	</view>
</template>
<script setup lang="ts">
	import { handleStaticResources } from '@/core/utils';

	const props = withDefaults(defineProps<{
		data : any,
	}>(), {
		data: {},
	});

	const emit = defineEmits(['handleClickArticle'])

	const handleClickArticle = () => {
		emit('handleClickArticle', props.data.id);
	}
</script>
<style lang="scss" scoped>
	@import './coreshop-article.scss';
</style>